package com.scs.application.modules.base.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
/**
 * <p>
 * 耗材信息
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "耗材信息表")
@TableName("base_matr")
@EntityIndexAnnotation(ix = {"supplier_id","category_id","mfg_id","flag_disabled","flag_consignment","flag_omoc","flag_high","mscm_disabled","his_code","his_disabled","mscm_code","hrp_code","hrp_disabled","hrp_finance_disabled","flag_sunpurchase","flag_gys","flag_temporary_purchase","flag_plague_matr","sunpurchase_code","flag_his_medicare"})
public class Matr extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "默认供应商ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = "默认供应商ID"
    )
    private String supplierId;

    @EntityFieldAnnotation(
            text = "默认供应商名字",
            length = "100",
            default_value = "",
            comment = "默认供应商名字"
    )
    private String supplierName;
    @TableField(exist = false)
    private String supplierNamePy;

    @EntityFieldAnnotation(
            text = "品类ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "0",
            comment = "品类ID"
    )
    private String categoryId;

    @EntityFieldAnnotation(
            text = "品类名称",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "品类名称"
    )
    private String categoryName;

    @EntityFieldAnnotation(
            text = "品名ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "0",
            comment = "品名ID"
    )
    private String matrNameId;

    @EntityFieldAnnotation(
            text = "品名",
            length = "100",
            not_null = true,
            default_value = "",
            comment = "品名"
    )
    private String name;

    @EntityFieldAnnotation(
            text = "品名助记码",
            length = "200",
            not_null = false,
            default_value = "",
            comment = "品名助记码"
    )
    private String namePy;

    @EntityFieldAnnotation(
            text = "品规",
            length = "255",
            not_null = true,
            default_value = "",
            comment = "品规"
    )
    private String spec;

    @EntityFieldAnnotation(
            text = "厂商ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = "厂商ID"
    )
    private String mfgId;

    @EntityFieldAnnotation(
            text = "厂商名称",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "厂商名称"
    )
    private String mfgName;

    @TableField(exist = false)
    private String mfgNamePy;

    @EntityFieldAnnotation(
            text = "禁用标志",
            length = "",
            not_null = true,
            default_value = "0",
            comment = "是否禁用"
    )
    private Boolean flagDisabled;

    @EntityFieldAnnotation(
            text = "寄售模式标志",
            length = "",
            not_null = true,
            default_value = "0",
            comment = "是否寄售"
    )
    private Boolean flagConsignment;

    @EntityFieldAnnotation(
            text = "一物一码管理标志",
            length = "",
            not_null = true,
            default_value = "0",
            comment = "一物一码"
    )
    private Boolean flagOmoc;

    @EntityFieldAnnotation(
            text = "高耗标志",
            length = "",
            not_null = true,
            default_value = "0",
            comment = "是否高耗"
    )
    private Boolean flagHigh;

    @EntityFieldAnnotation(
            text = "供应室标志",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "供应室标志"
    )
    private Boolean flagGys;

    @EntityFieldAnnotation(
            text = "GTIN码",
            length = "20",
            not_null = false,
            default_value = "",
            comment = "GTIN码"
    )
    private String gtin;

    @EntityFieldAnnotation(
            text = "udi码",
            length = "50",
            not_null = false,
            default_value = "",
            comment = "udi码"
    )
    private String udi;

    @EntityFieldAnnotation(
            text = "hibc码",
            length = "50",
            not_null = false,
            default_value = "",
            comment = "hibc码"
    )
    private String hibc;

    @EntityFieldAnnotation(
            text = "单品单位",
            length = "10",
            not_null = false,
            default_value = "",
            comment = "单品单位"
    )
    private String skuUnit;

    @EntityFieldAnnotation(
            text = "单品单价",
            not_null = false,
            default_value = "",
            comment = "单品单价"
    )
    private Double skuPrice;

    @EntityFieldAnnotation(
            text = "SN份数",
            length = "",
            not_null = false,
            default_value = "1",
            comment = "SN份数"
    )
    private Integer snCount;

    @EntityFieldAnnotation(
            text = "注册证号",
            length = "50",
            not_null = false,
            default_value = "",
            comment = "注册证号"
    )
    private String certificateNo;
    @EntityFieldAnnotation(
            text = "注册证开始时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = "注册证开始时间"
    )
    private Date certificateBegin;


    @EntityFieldAnnotation(
            text = "注册证效期",
            length = "",
            not_null = false,
            default_value = "",
            comment = "注册证效期"
    )
    private Date certificateExp;

    @EntityFieldAnnotation(
            text = "MSCM系统编码",
            length = "30",
            not_null = false,
            default_value = "",
            comment = "MSCM系统编码"
    )
    private String mscmCode;

    @EntityFieldAnnotation(
            text = "资质禁用标志",
            length = "",
            not_null = true,
            default_value = "0",
            comment = "资质禁用标志"
    )
    private Boolean mscmDisabled;

    @EntityFieldAnnotation(
            text = "资质禁用说明，示例：营业执照到期等",
            length = "500",
            not_null = false,
            default_value = "",
            comment = "资质禁用说明"
    )
    private String mscmDisabledDesc;

    @EntityFieldAnnotation(
            text = "HRP:从HRP同步,MSCM:供应商平台",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "数据来源类型"
    )
    private String refType;

    @EntityFieldAnnotation(
            text = "HIS编码",
            length = "30",
            not_null = false,
            default_value = "",
            comment = "HIS编码"
    )
    private String hisCode;

    @EntityFieldAnnotation(
            text = "HIS名称",
            length = "400",
            not_null = false,
            default_value = "",
            comment = "HIS名称"
    )
    private String hisName;

    @EntityFieldAnnotation(
            text = "his价格",
            not_null = false,
            default_value = "",
            comment = "his价格"
    )
    private Double hisPrice;


    @EntityFieldAnnotation(
            text = "HIS物价禁用",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "院方系统禁用"
    )
    private Boolean hisDisabled;

    @EntityFieldAnnotation(
            text = "HIS物价禁用说明",
            length = "500",
            not_null = false,
            default_value = "",
            comment = "院方系统禁用说明"
    )
    private String hisDisabledDesc;

   /* @EntityFieldAnnotation(
            text = "图片地址",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String imageUrl;
    @EntityFieldAnnotation(
            text = "缩略图片地址",
            length = "120",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String thumbnailImageUrl;*/

/*    @EntityFieldAnnotation(
            text = "HIS品规",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "HIS品规"
    )
    private String hisSpec;*/



    @EntityFieldAnnotation(
            text = "hrp耗材名称",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "hrp耗材名称"
    )
    private String hrpName;



    @EntityFieldAnnotation(
            text = "hrp耗材编码",
            length = "30",
            not_null = false,
            default_value = "",
            comment = "hrp耗材编码"
    )
    private String hrpCode;



    @EntityFieldAnnotation(
            text = "hrp耗材品规",
            length = "255",
            not_null = false,
            default_value = "",
            comment = "hrp耗材品规"
    )
    private String hrpSpec;



    @EntityFieldAnnotation(
            text = "hrp耗材单位",
            length = "10",
            not_null = false,
            default_value = "",
            comment = "hrp耗材单位"
    )
    private String hrpUnit;



    @EntityFieldAnnotation(
            text = "hrp耗材厂商代码",
            length = "30",
            not_null = false,
            default_value = "",
            comment = "hrp耗材厂商"
    )
    private String hrpMfgCode;

    @EntityFieldAnnotation(
            text = "hrp耗材厂商",
            length = "200",
            not_null = false,
            default_value = "",
            comment = "hrp耗材厂商"
    )
    private String hrpMfg;



    @EntityFieldAnnotation(
            text = "hrp耗材物流禁用状态",
            length = "100",
            not_null = false,
            default_value = "0",
            comment = "hrp耗材物流禁用状态"
    )
    private Boolean hrpDisabled;



    @EntityFieldAnnotation(
            text = "hrp耗材财务禁用状态",
            length = "100",
            not_null = false,
            default_value = "0",
            comment = "hrp耗材财务禁用状态"
    )
    private Boolean hrpFinanceDisabled;

    // creator ,在父类中处理


    // gmt_create ,在父类中处理


    // modifier ,在父类中处理


    // gmt_modified ,在父类中处理

    @EntityFieldAnnotation(
            text = "是否集中采购",
            length = "",
            not_null = true,
            default_value = "0",
            comment = "1:科室不允许进行需求计划"
    )
    private Boolean flagCenterPurchase;

    @EntityFieldAnnotation(
            text = "是否防疫物资",
            length = "",
            not_null = true,
            default_value = "0",
            comment = "0:正常 | 1:防疫"
    )
    private Boolean flagPlagueMatr;

    @EntityFieldAnnotation(
            text = "备注",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    @EntityFieldAnnotation(
            text = "中标号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String bidno;

    /**
    * @Description：是否是编辑，1:编辑
    * @Author wyt
    * @Date 2020/11/2
    */
    @TableField(exist = false)
    private String isEdit;

    @EntityFieldAnnotation(
            text = "是否可收费",
            length = "100",
            not_null = false,
            default_value = "0",
            comment = "1:可以"
    )
    private Boolean hisFlagCharge;


    @EntityFieldAnnotation(
            text = "是阳光采购",
            length = "100",
            not_null = false,
            default_value = "0",
            comment = "1:是"
    )
    private Boolean flagSunpurchase;
    @EntityFieldAnnotation(
            text = "阳光采购指标",
            not_null = false,
            default_value = "",
            comment = "阳光采购对应院内采购指标数量"
    )
    private Double skuQtySunpurchase;

    @EntityFieldAnnotation(
            text = "是临时采购",
            length = "100",
            not_null = false,
            default_value = "0",
            comment = "1:是,0:否"
    )
    private Boolean flagTemporaryPurchase;

    @EntityFieldAnnotation(
            text = "准入时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = "准入时间"
    )
    private Date admDate;

    @EntityFieldAnnotation(
            text = "阳光采购代码",
            length = "30",
            not_null = false,
            default_value = "",
            comment = "阳光采购代码"
    )
    private String sunpurchaseCode;

    @EntityFieldAnnotation(
            text = "标签类型",
            length = "10",
            not_null = false,
            default_value = "type1",
            comment = "type1:普通标签，type2：抗金属标签"
    )
    private String labelType;

    @EntityFieldAnnotation(
            text = "是否停用",
            length = "10",
            not_null = false,
            default_value = "0",
            comment = "0:未停用，1：停用"
    )
    private String isStop;


    /**
     * @description 阳采信息
     * @autor mxb
     * @date 2021/5/8
     */

    @EntityFieldAnnotation(
            text = "阳采产品ID",
            length = "30",
            not_null = false,
            default_value = "",
            comment = "阳采产品ID"
    )
    private String sunGoodsId;
    @EntityFieldAnnotation(
            text = "阳采分类",
            length = "30",
            not_null = false,
            default_value = "",
            comment = "阳采分类"
    )
    private String sunSortName;
    @EntityFieldAnnotation(
            text = "阳采品名",
            length = "50",
            not_null = false,
            default_value = "",
            comment = "阳采品名"
    )
    private String sunGoodsName;
    @EntityFieldAnnotation(
            text = "阳采单位",
            length = "30",
            not_null = false,
            default_value = "",
            comment = "阳采单位"
    )
    private String sunUnit;
    @EntityFieldAnnotation(
            text = "阳采规格型号编号",
            length = "50",
            not_null = false,
            default_value = "",
            comment = "阳采规格型号编号"
    )
    private String sunSubcodeId;
    @EntityFieldAnnotation(
            text = "阳采规格",
            length = "30",
            not_null = false,
            default_value = "",
            comment = "阳采规格"
    )
    private String sunOutlookc;
    @EntityFieldAnnotation(
            text = "阳采型号",
            length = "30",
            not_null = false,
            default_value = "",
            comment = "阳采型号"
    )
    private String sunGoodtype;

    //阳采规格型号编号
    @EntityFieldAnnotation(
            text = "阳采规格型号编号",
            length = "32",
            not_null = false,
            default_value = "0",
            comment = "阳采规格型号编号"
    )
    private String sunPurchaseSpecId;

   @EntityFieldAnnotation(
            text = "存储温度",
            not_null = false,
            length = "30",
            default_value = "",
            comment = "取自数据字典：matr_temperature.value"
    )
    private String temperature;


    @EntityFieldAnnotation(
            text = "人份",
            not_null = false,
            default_value = "0",
            comment = "人份"
    )
    private Double personPortion;

    @EntityFieldAnnotation(
            text = "耗材基础分类",
            length = "10",
            not_null = false,
            default_value = "matr",
            comment = "matr:耗材，reagent：试剂，drugs：药品"
    )
    private String baseType;

    @EntityFieldAnnotation(
            text = "禁用标志",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "耗材禁用"
    )
    private Boolean flagForbidden;

    @EntityFieldAnnotation(
            text = "耗材禁用类型-供应商",
            length = "2",
            not_null = false,
            default_value = "0",
            comment = "1-供应商经营许可证2-供应商营业执照，3-供应商授权书，"
    )
    private String forbiddenTypeSur;
    @EntityFieldAnnotation(
            text = "耗材禁用类型-厂商",
            length = "2",
            not_null = false,
            default_value = "0",
            comment = "4-厂商营业执照，5-厂商生产许可证，6-厂商授权书，7-注册证"
    )
    private String forbiddenTypeMfg;

    @EntityFieldAnnotation(
            text = "耗材型号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "耗材型号"
    )
    private String model;

    @EntityFieldAnnotation(
            text = "药交id",
            length = "16",
            not_null = false,
            default_value = "",
            comment = "药交id"
    )
    private String transactionId;

    @EntityFieldAnnotation(
            text = "工伤代码",
            length = "16",
            not_null = false,
            default_value = "",
            comment = "工伤代码"
    )
    private String inuryCode;


    @EntityFieldAnnotation(
            text = "HIS收费编码",
            length = "16",
            not_null = false,
            default_value = "",
            comment = "HIS收费编码"
    )
    private String chargingCode;

    @EntityFieldAnnotation(
            text = "是否库存试剂",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "1:是,0:否"
    )
    private Boolean flagStockReagent;


    @EntityFieldAnnotation(
            text = "是医保",
            length = "100",
            not_null = false,
            default_value = "0",
            comment = "1:是"
    )
    private Boolean flagHisMedicare;

    @EntityFieldAnnotation(
            text = "医保代码20位",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String hisMedicareNo;


    @EntityFieldAnnotation(
            text = "医保名称20位",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String hisMedicareName;

    @EntityFieldAnnotation(
            text = "医保代码27位",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String hisMedicareNo2;


    @EntityFieldAnnotation(
            text = "医保名称27位",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String hisMedicareName2;

    @EntityFieldAnnotation(
            text = "是否植入耗材",
            not_null = false,
            default_value = "0",
            comment = "1:是"
    )
    private Boolean flagImplantation;

    @EntityFieldAnnotation(
            text = "是否介入耗材",
            not_null = false,
            default_value = "0",
            comment = "1:是"
    )
    private Boolean flagInterventional;

    @EntityFieldAnnotation(
            text = "是否进口",
            not_null = false,
            default_value = "0",
            comment = "1:是"
    )
    private Boolean flagImported;

    @EntityFieldAnnotation(
            text = "是否集采",
            not_null = false,
            default_value = "0",
            comment = "1:是"
    )
    private Boolean flagPurcenter;

    @EntityFieldAnnotation(
            text = "采购类型",
            not_null = false,
            default_value = "",
            comment = "采购类型，来自数据字典 purchase_type"
    )
    private String purchaseType;

    @EntityFieldAnnotation(
            text = "是否重点监控",
            not_null = false,
            default_value = "0",
            comment = "1:是"
    )
    private Boolean flagMonitor;


    @EntityFieldAnnotation(
            text = "带量采购类型",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String matrQbtCode;

    @EntityFieldAnnotation(
            text = "his或者hrp商品的唯一标识",
            length = "50",
            not_null = false,
            default_value = "",
            comment = "his或者hrp商品的唯一标识"
    )
    private String matrIdSync;


    //数量化管理,开启后，该商品入库出库支持数量化操作，库存以商品id+批号累加，只有【非标签管理】的支持数量化操作
    private Boolean flagMagnum;


    // 供应商是否禁用了
    @TableField(exist = false)
    private Boolean flagDisabledSp;

    // 商品异常信息
    @TableField(exist = false)
    private String matrErrMsg;


    // true 禁用供应商修改
    @TableField(exist = false)
    private Boolean flagDisabledSpEdit;

}
